Skip to content

fix: remove eager workspace expansion that negated module-scoping#50

Merged
aviadshiber merged 1 commit intomainfrom
fix/remove-eager-expansion
Apr 11, 2026
Merged

fix: remove eager workspace expansion that negated module-scoping#50
aviadshiber merged 1 commit intomainfrom
fix/remove-eager-expansion

Conversation

@aviadshiber
Copy link
Copy Markdown
Owner

Summary

  • Remove eager _expand_workspace_background() call from _lazy_start_jdtls — it was adding the full monorepo root and removing the initial module immediately after init, undoing the module-scoping optimization from feat: lazy module-scoped jdtls initialization with incremental loading #46
  • Gate module READY signal on publishDiagnostics from jdtls (reliable indexing-complete signal) instead of first non-None response
  • Add _start_failed retry with 5-minute cooldown so transient failures don't permanently disable jdtls

Design Review

4-agent ensemble review (scope, security, scalability, devil's advocate). Key insight from devil's advocate: expand_full_workspace negates the entire module-scoping optimization — for agents working on 1-3 files, on-demand add_module_if_new is sufficient.

Test plan

  • All 361 tests pass
  • Pre-commit checks pass (lint, format, type check, coverage 84%)
  • Manual: open Java file from products repo, verify no 120s timeout
  • Manual: verify hover/definition works within ~15s
  • Manual: verify on-demand module loading when opening files from different modules

🤖 Generated with Claude Code

The _lazy_start_jdtls function was calling _expand_workspace_background()
immediately after jdtls initialized, which added the full monorepo root
and removed the initial module — undoing the module-scoping optimization
from #46 and causing 120s initialize timeouts on large workspaces.

Changes:
- Remove eager expansion; modules load on-demand via add_module_if_new()
- Gate READY signal on publishDiagnostics (reliable indexing-complete
  signal) instead of first non-None response
- Add _start_failed retry with 5-minute cooldown so transient failures
  don't permanently disable jdtls for the session

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@aviadshiber aviadshiber merged commit 9f67d6c into main Apr 11, 2026
14 checks passed
@aviadshiber aviadshiber deleted the fix/remove-eager-expansion branch April 11, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants